<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('查看下发任务')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: bootstrap-fileinput-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-task-grant-edit">
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-2 control-label">任务标题：</label>
                <div class="col-sm-9">
                    <input type="text" required maxlength="50"  th:field="*{task.taskTitle}"  class="form-control" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">紧急程度：</label>
                <div class="col-sm-9">
                    <th:block th:if="*{task.priority}==1">
                        <input type="text" required maxlength="50"  value="紧急"  class="form-control" readonly>
                    </th:block>
                    <th:block th:if="*{task.priority}==2">
                        <input type="text" required maxlength="50"  value="非常紧急"  class="form-control" readonly>
                    </th:block>
                    <th:block th:if="*{task.priority}==0">
                        <input type="text" required maxlength="50"  value="普通"  class="form-control" readonly>
                    </th:block>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">任务时间：</label>
                <div class="col-sm-9">
                    <div class="input-daterange input-group">
                        <input type="text" class="input-sm form-control" id="datetimepicker-startTime" th:field="*{task.starttime}" placeholder="开始时间" readonly>
                        <span class="input-group-addon">-</span>
                        <input type="text" class="input-sm form-control" id="datetimepicker-endTime" placeholder="结束时间" th:field="*{task.endtime}" readonly>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">下发人员：</label>
                <div class="col-sm-9">
                    <input type="text" required maxlength="50"  class="form-control"  th:value="${task.userName}" th:field="*{task.userName}" readonly>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">附件：</label>
                <div class="col-sm-9">
                    <input type="text" required maxlength="50"  class="form-control"  th:value="${task.file}" th:field="*{task.file}" readonly>
                    <input type="text" th:id="fileName" th:value="${task.fileName}" th:field="*{task.fileName}" class="hidden">
                    <input type="text" th:id="url" th:value="${task.url}" th:field="*{task.url}" class="hidden">
                </div>
             <!--   <div class="col-sm-3">
                    <button type="button" class="btn btn-primary fa fa-cloud-download" onclick="download()"> 下&nbsp;&nbsp;载</button>
                </div>-->
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">任务内容：</label>
                <div class="col-sm-9">
                    <textarea type="text" style="height: 100px" name="content" id="content" multiple th:field="*{task.content}" class="form-control" placeholder="请输入任务内容" required maxlength="255" readonly></textarea>
                </div>
            </div>
        </div>
    </form>
</div>

<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<script type="text/javascript">
    function submitHandler() {
        parent.$.modal.closeAll();
    }

   /*function download() {
        var fileName = $("#fileName").val();
        var url = $("#url").val();
        window.location.href= ctx + "common/download?fileName=" + fileName;
    }*/
</script>
</body>
</html>
